<html>
<body>
<head>
</head>
<div>
<?

//open form with Codeigniter standard
$this->load->helper('form');
echo form_open('stat/graph');//post form to "graph" Method in "stat"Controller

    //Dropdownlist for room
    echo form_label('Room :', 'room');
    $room = array(
                      '1202'  => '1202',
                      '1204'  => '1204',
                      '1201'  => '1201',
                      '1201A' => '1201A',
                      '1207' => '1207',
                      '1408' => '1408',
                    );
    echo form_dropdown('room', $room, '1202');



    /*//drop down for type graph
    echo form_label('Graph :', 'graph');
    $options = array(
                      'bar'  => 'bar',
                      'pie'    => 'pie',
                      'line'   => 'line',
                    );
    echo form_dropdown('type', $options, 'bar');*/
    //Dropdownlist for month
    echo form_label('Month :', 'month');
    $month = array(
                    'jan'  => 'January',
                    'feb'  => 'February',
                    'mar'  => 'March',
                    'april'  => 'April',
                    'may'  => 'May',
                    'june'  => 'June',
                    'july'  => 'July',
                    'aug'  => 'August',
                    'sep'  => 'September',
                    'oct'  => 'October',
                    'nov'  => 'November',
                    'dec'  => 'December',

                  );
    echo form_dropdown('month', $month, 'jan');

    /*//textbox for duration
    echo form_label('Duration :', 'duration');
    $parameter = isset($parameter) == true ? $parameter : "2012-03-%";
    $data = array(
                  'name'    => 'parameter',
                  'value'   => $parameter
                );

    echo form_input($data);*/

    //Dropdownlist for year
    echo form_label('Year :', 'year');
    $year = array(
                    '2012'  => '2012',
                   );
    echo form_dropdown('year', $year, '2012');

    //submit Button
    echo form_submit('submit', 'Submit');
?>
    </div>
</hr>
</hr>
<img src="data:image/png;base64,<?php echo $graph;?>"/>
</body>
</html>